<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>订单信息管理</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
<script type="text/javascript" src="/RMS/js/jquery-2.1.1.js"></script>
<link rel="stylesheet" type="text/css" href="/RMS/css/easy_ui/base.css"/>
<script type="text/javascript">
//删除操作
function onDelete(id){
	if(confirm("确定要删除吗？")){
		alert("88888888888");
	}
}

function submitForm(type){
	var pages = ${page.pages};
	
	if(type>1&&type<pages)
		$("#pageNum").val(type);
	else{
		return;
	}
	
	var f = document.getElementById("idForm");
	f.action="/RMS/order/list.do";
	alert($("#pageNum").val());
	f.submit();
}






</script>
</head>

<body>
<form action="/RMS/order/list.do" method="post" id="idForm">
<input type="hidden" id="pageNum" value="${page.pageNum }"/>
<input type="hidden" id="pageSize" value="${page.pageSize }"/>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="/RMS/images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1"> 订单信息管理</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE1">
              <input type="checkbox" name="checkbox11" id="checkbox11" />
              全选      &nbsp;&nbsp;<img src="/RMS/images/add.gif" width="10" height="10" /> 添加   &nbsp; <img src="/RMS/images/del.gif" width="10" height="10" /> 删除    &nbsp;&nbsp;<img src="/RMS/images/edit.gif" width="10" height="10" /> 编辑   &nbsp;</span><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
      <tr>
        <td width="4%" height="20" bgcolor="d3eaef" class="STYLE10"><div align="center">
          <input type="checkbox" name="checkbox" id="checkbox" />
        </div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">顾客用户名</span></div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">下单时间</span></div></td>
        <td width="11%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">修改时间</span></div></td>
        <td width="11%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">修改人</span></div></td>
        <td width="11%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">订单总价</span></div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">菜品总数</span></div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">服务员确认</span></div></td>
        <td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">结账</span></div></td>
        <td width="14%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></td>
      </tr>
      <c:forEach items="${page.list }" var="m">
      <tr>
        <td height="20" bgcolor="#FFFFFF"><div align="center">
          <input type="checkbox" name="checkbox2" id="checkbox2" />
        </div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">${m.customer_name }</span></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><fmt:formatDate value="${m.create_date }" pattern="yyyy-MM-dd HH:mm:ss"/></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"><fmt:formatDate value="${m.update_date }" pattern="yyyy-MM-dd HH:mm:ss"/></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${m.updateUser.username }</div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${m.total_money }</div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${m.num }</div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
        <c:choose>
        	<c:when test="${m.is_sure==1 }">否</c:when>
        	<c:otherwise>是</c:otherwise>
        </c:choose>   
        </div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
        <c:choose>
        	<c:when test="${m.is_pay==1 }">否</c:when>
        	<c:otherwise>是</c:otherwise>
        </c:choose>
        </div></td>
        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21"><a href="javascript:onDelete(${m.id })">删除</a> | <a href="javascript:onFindById(${m.id })">查看</a></div></td>
      </tr>
      
      </c:forEach>
      
    </table></td>
  </tr>
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="33%"><div align="left"><span class="STYLE22">&nbsp;&nbsp;&nbsp;&nbsp;共有<strong> ${page.total }</strong> 条记录，当前第<strong> ${page.pageNum }</strong> 页，共 <strong>${page.pages }</strong> 页</span></div></td>
        <td width="67%"><table border="0" align="right" cellpadding="0" cellspacing="0" class="STYLE21">
          <tr>
            <td width="49"><div align="center"><a href="/RMS/order/list.do?pageNum=${page.pageNum-1>0?page.pageNum-1:1}&pageSize=${page.pageSize}">上一页</a></div></td>
            <c:forEach items="${page.navigatepageNums}" var="nav">
                        <c:if test="${nav == page.pageNum}">
                            <td style="font-weight: bold;width:20px;background:gray;" align="center">${nav}</td>
                        </c:if>
                        <c:if test="${nav != page.pageNum}">
                            <td style="width:20px;" align="center"><a href="/RMS/order/list.do?pageNum=${nav}&pageSize=${page.pageSize}">${nav}</a></td>
                        </c:if>
            </c:forEach>
           
            <td width="49"><div align="center"><a href="/RMS/order/list.do?pageNum=${page.pageNum+1<=page.pages?page.pageNum+1:page.pages}&pageSize=${page.pageSize}">下一页</a></div></td>
            <td width="37" class="STYLE22"><div align="center">转到</div></td>
            <td width="22"><div align="center">
              <input type="text" name="go_pageNum" id="go_pageNum"  style="width:20px; height:12px; font-size:12px; border:solid 1px #7aaebd;" value="${page.pageNum }"/>
            </div></td>
            <td width="22" class="STYLE22"><div align="center">页</div></td>
            <td width="35"><input type="button" value="go"/></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>
